package com.imayday.feign;

import com.imayday.entity.Order;
import com.imayday.feign.impl.OrderFeignError;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(value = "order", fallback = OrderFeignError.class) // 服务在注册中心的名称
public interface OrderFeign {

    @GetMapping("/order/findAll")// 该服务内部的请求路径
    public List<Order> findAll();
}